<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	
    function __construct()
    {
        parent::__construct();
    	$this->load->library('session');
    	$this->load->database();
    	$this->load->model("centermod");
    	$this->load->helper('url');
    	$this->load->helper('language');
    	$this->load->helper('imagemerge');
    	$this->load->library('email');
    	$this->lang->load('pages');
	}
	
			
    
	public function index()
		{
			$data["listproduct"]=$this->centermod->getnewproductsforindexpage();
			$data["lang"]=$this->config->item('language');
			 $this->load->view("index",$data);
			 
		}
	public function aboutus()
		{
			$data["lang"]=$this->config->item('language');
			 $this->load->view("about",$data);
			 
		}
	
	public function latestproducts()
		{
			$data["listproduct"]=$this->centermod->getnewproductsforlist();
			$data["lang"]=$this->config->item('language');
			 $this->load->view("shop",$data);
			 
		}	
		
	public function contactus()
		{
			$data["lang"]=$this->config->item('language');
			 $this->load->view("contact",$data);
			 
		}	
	
}
?>
